<template>
  <div class="content_box">
    <div class="time_box" v-if="msg.orderTotalState==1">
      <div class="box">
        订单剩余时间还有
        <div class="down">
          <van-count-down use-slot :time="msg.timeRemaining" @change="onChange">
            <text class="item">{{ timeData.hours }}<text class="mh">小时</text></text>
            <text class="item">{{ timeData.minutes }}<text class="mh">分钟</text></text>
            <text class="item">{{ timeData.seconds }}<text class="mh">秒</text></text>
          </van-count-down>
        </div>
      </div>
    </div>
    <div class="img_box" @click="previewImage(msg.roomImg)" v-if="msg.roomIlk != 0">
      <van-image
        width="100%"
        height="319rpx"
        fit="cover"
        lazy-load
        :src="msg.roomImg&&msg.roomImg.length?msg.roomImg[0]:''"
      />
      <div class="dots">
        <img mode="widthFix" src="/static/images/more_img.png" alt="" />
        {{msg.roomImg&&msg.roomImg.length?msg.roomImg.length:0}}
      </div>
    </div>
    <div class="taiqiu-room" v-else>
      <!-- <p :class="{'on': item.roomName === msg.roomName}" v-for="(item, index) in list" :key="index">{{ item.roomName }}</p> -->
    </div>
   
    <div class="room_msg">
      <div class="name_box">
        <p class="name">{{msg.roomName}}（{{msg.roomTypeName}}）</p>
      </div>
      <div class="msg_box">
        <div class="changeTime">
          <div class="left">
            <p class="text">开始时间</p>
            <p class="day">{{msg.startWeek}} {{msg.startSj}}</p>
            <p class="time">{{msg.startDate1}}</p>
          </div>
          <div class="center">
            <p class="totel">共{{msg.timeLength}}小时</p>
          </div>
          <div class="left">
            <p class="text">结束时间</p>
            <p class="day">{{msg.endWeek}} {{msg.endSj}}</p>
            <p class="time">{{msg.endDate1}}</p>
          </div>
        </div>
      </div>
    </div>
    <div class="coupon-box" v-if="msg.orderTotalState==1 && msg.orderUseExtraTimeCard">
      <div class="cou_img">
        <img src="/static/images/vip1.png" alt="">
      </div>
      <div class="cou_img2">
        <img src="/static/images/vip2.png" alt="">
      </div>
      <p class="name">定向权益加时卡</p>
      <picker v-if="msg.useExtraTime" mode="selector" @change="handeChangeCard" :range="changeCardList" range-key="showtxt">
        <div class="nr">
          <p>
            可「免费续时
            <span v-if="cardDuration">{{ cardDuration }}</span>
            <span v-else>{{ cardList[0].duration }}</span>
            分钟」
          </p>
          <p class="an">立即使用</p>
        </div>
      </picker>
      <div class="nr" v-else-if="!msg.useExtraTime&&msg.orderUseExtraTimeCard&&msg.orderUseExtraTimeCard.useExtraTimeCardDuration">
        <p>
        已「免费续时<span >{{ msg.orderUseExtraTimeCard.useExtraTimeCardDuration }}</span>分钟」
        </p>
        <p class="an on">已使用</p>
      </div>
      <div class="nr" v-else>
        <p style="z-index: 2;">当前订单暂无可以使用的加时卡</p>
      </div>
      <p class="text" v-if="msg.orderUseExtraTimeCard && msg.orderUseExtraTimeCard.extraTimeCardTotal != null">本周可用 {{ msg.orderUseExtraTimeCard.availableNum }}次 / 共{{ msg.orderUseExtraTimeCard.extraTimeCardTotal }}次</p>
    </div>
    <div class="cz_box" v-if="msg.orderTotalState==1 || msg.orderTotalState==0">
      <div class="box" @click="toGiveFriends" v-if="msg.orderTotalState==0">
        <img src="/static/images/order_xq_icon1.png" alt="">
        <p class="text">转赠订单</p>
      </div>

      <!-- <div class="box on_on" v-if="msg.orderTotalState==0 && msg.changeRoom == 1">
        <img src="/static/images/order_xq_icon2.png" alt="">
        <p class="text">更换包间</p>
      </div>
      <div class="box" @click="toSwitchHouses" v-if="msg.orderTotalState==0 && msg.changeRoom == 0">
        <img src="/static/images/order_xq_icon2.png" alt="">
        <p class="text">更换包间</p>
      </div> -->


      
      <div class="box" v-if="msg.orderTotalState==1" @click="kefuShow = true">
        <img src="/static/images/order_xq_icon5.png" alt="">
        <p class="text">联系客服</p>
      </div>
      <div class="box" @click="toXudan">
        <img src="/static/images/order_xq_icon3.png" alt="">
        <p class="text">订单续单</p>
      </div>
      <div class="box" @click="openDoor(1)">
        <img src="/static/images/order_xq_icon4.png" alt="">
        <p class="text">{{!msg.roomIlk?'立即开台':'打开房间' }}</p>
      </div>
      <div class="box" @click="toSnacks">
        <img src="/static/images/order_xq_icon3.png" alt="">
        <p class="text">购物点单</p>
      </div>
    </div>
    <div class="order_msg">
      <div class="title_box">
        <p class="title"><span></span>订单信息</p>
        <p class="status" v-if="msg.orderTotalState==1">使用中</p>
        <p class="status on1" v-else-if="msg.orderTotalState==0">已预约</p>
        <p class="status on" v-else-if="msg.orderTotalState==2">已完成</p>
        <p class="status" v-else-if="msg.orderTotalState==3">已取消</p>
        <p class="status" v-else-if="msg.orderTotalState==4">待付款</p>
        <p class="status" v-else-if="msg.orderTotalState==5">正在付款</p>
        <p class="status" v-else-if="msg.orderTotalState==6">提前取消</p>
        <p class="status" v-else-if="msg.orderTotalState==7">提前结束</p>
        <p class="status" v-else-if="msg.orderTotalState==8">平台退款</p>
      </div>
      <div class="list_box">
        <div class="box">
          <p class="title">订单模式</p>
          <p class="text">{{!msg.billingMode?'套餐模式':'小时模式'}}</p>
        </div>
        <div class="box">
          <p class="title">支付方式</p>
          <p class="text">{{msg.payType == 1?'余额支付':msg.payType == 2?'美团验券':msg.payType == 3?'抖音验券':msg.payType == 4?'卡券兑换':'微信支付'}}</p>
        </div>
        <div class="box">
          <p class="title">下单时间</p>
          <p class="text">{{msg.createTime}}</p>
        </div>
        <div class="box">
          <p class="title">订单金额</p>
          <p class="text">￥{{msg.totalPrice}}</p>
        </div>
        <div class="box" v-if="msg.discounts">
          <p class="title">优惠金额</p>
          <p class="text">-￥{{msg.discounts}}</p>
        </div>
        <div class="box">
          <p class="title">实付金额</p>
          <p class="text">￥{{msg.realPrice}}</p>
        </div>
        <div class="box" v-if="msg.refundAmount != '0.00'">
          <p class="title">退款金额</p>
          <p class="text">￥{{msg.refundAmount}}</p>
        </div>
        
        <div class="box">
          <p class="title">订单编号</p>
          <p class="text">{{msg.orderCode}}</p>
        </div>
        <!-- <div class="box">
          <p class="title">服务地址</p>
          <p class="text">{{msg.address}}</p>
        </div> -->
      </div>
    </div>
    <!-- 续单列表 -->
    <div class="action_box" v-if="msg.reorderDetailsList && msg.reorderDetailsList.length">
      <div class="tir_top"><span></span>续单</div>
      <div class="xufei">
        <div class="x_nr" v-for="(child,i) in msg.reorderDetailsList" :key="i">
            <div v-if="child.payType == 5 || child.payType == 6">
                <p>续单类型</p>
                <p class="yyy" v-if="child.payType == 5">商家赠与</p>
                <p class="yyy" v-else-if="child.payType == 6">加时卡</p>
                <p class="yyy" v-else>微信/余额</p>
              </div>
             <div>
                <p>续单状态</p>
                <p class="yyy" v-if="child.orderTotalState == 0">已预约</p>
                <p class="jxz" v-if="child.orderTotalState == 1">进行中</p>
                <p class="ywc" v-if="child.orderTotalState == 2">已完成</p>
                <p class="ytk" v-if="child.orderTotalState == 3">已退款</p>
             </div>
             <div>
                <p>续单时长</p>
                <p>{{child.reorderHour}} <span v-if="child.payType != 5">￥{{child.realPrice}}</span></p>
             </div>
             <div>
               <p>续单编号</p>
               <p>{{child.orderCode}}</p>
             </div>
             <div>
               <p>续单时间</p>
               <p>{{child.finishPayTime}}</p>
             </div>
           <!--  -->
             <p @click.stop="cancelOrder(child.id)" class="anniu" v-if="child.orderTotalState == 0 && child.payType != 5 && child.payType != 6">退款</p>
        </div>
      </div>
    </div>


    <!-- 购物点单 -->
    <!-- <div class="action_box">
      <div class="tir_top"><span></span>购物点单</div>
      <div class="xufei">
        <div class="x_nr" v-for="(child,i) in 2" :key="i">
          <div>
            <p>商品</p>
            <p>玉溪 x1</p>
          </div>
          <div>
            <p>价格</p>
            <p><span>￥20</span></p>
          </div>
        </div>
      </div>
    </div> -->
    <div class="action_box" :style="{marginBottom:isIphoneXnum+20+'px'}">
      <div class="tir_top"><span></span>订单须知</div>
      <div class="tir_one">1、订单转赠好友后，好友也可直接自助开门进入门店包间;</div>
      <div class="tir_one">2、订单续单可能碰到后续时间段被人预定而无法续单的 情况，请提前规划好预约时间段;</div>
      <div class="tir_one">3、如果临时有事无法到店消费，请在订单开始前进行取 消订单操作，否则无法退款;</div>
    </div>
    <p style="height:1px"></p>


    <block v-if="msg.orderTotalState==0">
      <div class="anniu_box" v-if="msg.payType == 0 || msg.payType == 1">
        <div class="box" :style="{paddingBottom:isIphoneXnum+'px'}">
          <p @click="cancelOrder(orderId)" style="width:100%">取消订单</p>
        </div>
      </div>
    </block>

    <block v-if="(msg.payType == 2 || msg.payType == 3) && msg.orderTotalState==2">
      <div class="anniu_box">
        <div class="box" :style="{paddingBottom:isIphoneXnum+'px'}">
          <p v-if="msg.rebate" @click="toPinglun" style="width:100%">好评返现</p>
          <p v-else style="width:100%" class="on">好评返现</p>
        </div>
      </div>
    </block>


    <!-- 联系客服 -->
    <div class="wifi_pop">
      <van-popup :show="kefuShow">
        <div class="box">
          <img class="bj" src="https://yxzw.oss-cn-chengdu.aliyuncs.com/rich/20230713/RpoflPSDlfvw6BsjHE0z.png" alt="">
          <div class="nr1">
            <button type="primary" open-type="contact">
              <div class="img">
                <p class="img1">
                  <img src="/static/images/pop_kf.png" alt="">
                </p>
                <p class="text">在线客服</p>
              </div>
            </button>
            <button @click="callPhone">
              <div class="img">
                <p class="img2">
                  <img src="/static/images/pop_tell.png" alt="">
                </p>
                <p class="text">电话客服</p>
              </div>
            </button>
          </div>
          <p class="anniu1" @click="kefuShow = false">取消</p>
        </div>
      </van-popup>
    </div>
  </div>
</template>

<script>
import { 
  getToken,
  getUserPhone
} from "@/utils/auth";
import { Debounce,minTime } from "@/utils"
import { 
  useExtraTimeCard,
  getUserExtraTimeCard,
  getRoomByStoreId,
  getMyOrderDetails,
  orderUnLock,
  startBack,
  endUse,
  unStoreLock
} from "@/api/index";
export default {
  data() {
    return {
      timeData: {},
      msg:{
        usedTime:30 * 60 * 60 * 1000,
        timeRemaining:30 * 60 * 60 * 1000
      },
      isIphoneXnum:0,
      orderId:'',
      wifiShow:false,
      kefuShow:false,
      isOpen:false,
      shareType:0,// 0是正常进入，1是分享进入
      cardList:[],
      list:[],
      changeCardList: [],
      cardDuration: ''
    };
  },
  methods: {

    // 跳转零食
    toSnacks() {
      wx.navigateTo({
        url: `/pages/order_xq/snacks/main?orderId=${this.orderId}`,
      });
    },

    async getRoomList() {
      await getRoomByStoreId({roomIlk:0}).then(res=>{
        if(res.statusCode == '00000'){
          this.list = res.data
        }else{
          this.$toast(res.message)
        }
      })
    },

    // 获取加时卡列表
    getCardList() {
      getUserExtraTimeCard().then(res => {
        if (res.statusCode === '00000') {
          this.cardList = res.data.userExtraTimeCards.filter(item => item.status === 0);
          res.data.userExtraTimeCards.map(item => {
              if (this.msg.roomIlk === item.cardIlk) {

            
                this.changeCardList.push(item);
                
              }
            });
        } else {
          this.$toast(res.message);
        }
      });
    },

    // 选择加时卡
    handeChangeCard(e){
      let index = +e.mp.detail.value
      let id = this.changeCardList[index].id
      this.cardDuration = this.changeCardList[index].duration
      const data = {
        orderId:this.orderId,
        userExtraTimeCardId:id
      }
      useExtraTimeCard(data).then(res=>{
        if(res.statusCode == '00000'){
          wx.hideLoading()
          this.$toast('使用成功')
          this.getOrderMsg()
          // this.getCardList()
        }else{
          wx.hideLoading()
          this.$toast(res.message)
        }
      })
    },

    // 跳转评论
    toPinglun(){
      //console.log(this.msg)
      wx.navigateTo({
        url: `/pages/pinglun/main`,
      });
    },

    // 客服电话
    callPhone() {
      wx.makePhoneCall({
        phoneNumber: this.msg.userTel //仅为示例，并非真实的电话号码
      })
    },

    // 换房
    toSwitchHouses(){
      wx.navigateTo({
        url: `/pages/switchHouses/main?orderId=${this.orderId}`,
      });
    },

    // 转赠订单
    toGiveFriends(){
      wx.navigateTo({
        url: `/pages/giveFriends/main?orderId=${this.orderId}`,
      });
    },

    // 跳转续单
    toXudan(){
      if(!getUserPhone()){
        wx.navigateTo({
          url: '/pages/authorization/main',
        });
        return
      }
      let timeLength = this.getHour(this.msg.startTime,this.msg.endTime)
      
      let info = {
        endTime:this.msg.endTime,
        orderId:this.msg.id,
        price:this.msg.price,
        roomId:this.msg.roomId,
        roomName:this.msg.roomName,
        serviceTime:timeLength,
        startTime:this.msg.startTime
      }
      //console.log(info)
      info.endTime = info.endTime.replace(/-/g, '/')
      info.startTime = info.startTime.replace(/-/g, '/')
      wx.navigateTo({
        url: `/pages/renewalOrder/main?info=${JSON.stringify(info)}`,
      });
    },

    // 取消订单
    cancelOrder(orderId){
      wx.navigateTo({
        url: `/pages/refund/main?orderId=${orderId}`,
      });
    },

    // 开门
    openDoor:Debounce(function (num) {
      if(!getUserPhone()){
        wx.navigateTo({
          url: '/pages/authorization/main',
        });
        return
      }
      if(!this.isOpen){
        this.isOpen = true
        this.$showLoading('开门中...')
        let returnData = !num?unStoreLock({orderId:this.orderId}):orderUnLock({orderId:this.orderId})
        returnData.then(res=>{
          if(res.statusCode == '00000'){
            this.isOpen = false
            wx.hideLoading()
            this.$toast('开门成功')
          }else{
            this.isOpen = false
            wx.hideLoading()
            this.$toast(res.message)
          }
        })
        // orderUnLock({orderId:this.orderId}).then(res=>{
        //   if(res.statusCode == '00000'){
        //     wx.hideLoading()
        //     this.isOpen = false
        //     this.$toast('开门成功')
        //   }else{
        //     wx.hideLoading()
        //     this.$toast(res.message)
        //     this.isOpen = false
        //   }
        // })
      }
    },300),

    // 房间图片预览
    previewImage(img) {
      wx.previewImage({
        current: img[0], // 当前显示图片的http链接
        urls: img, // 需要预览的图片http链接列表
      });
    },

    // 获取订单详情
    getOrderMsg(){
      this.$showLoading('加载中...')
      this. changeCardList=[]
      getMyOrderDetails({orderId:this.orderId}).then(res=>{
        if(res.statusCode == '00000'){
          let weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
          let startTime = res.data.startTime.replace(/-/g,'/')
          let endTime = res.data.endTime.replace(/-/g,'/')
          startTime =  startTime.replace(/-/g,'/')
          endTime =  endTime.replace(/-/g,'/')
          let startDay = new Date(startTime)
          let endDay = new Date(endTime)
          let startWeek = startDay.getDay()
          let endWeek = endDay.getDay()
          let startDate1 = res.data.startTime.split(" ")[0];
          let startSj = res.data.startTime.split(" ")[1].split(":");
          let endDate1 = res.data.endTime.split(" ")[0];
          let endSj = res.data.endTime.split(" ")[1].split(":");
          let timeLength = this.getHour(res.data.startTime,res.data.endTime)
          // //console.log(weeks[startWeek])

          if(res.data.orderUseExtraTimeCard&&res.data.orderUseExtraTimeCard&&res.data.orderUseExtraTimeCard.userExtraTimeCards&&res.data.orderUseExtraTimeCard.userExtraTimeCards.length){
            this.cardList = res.data.orderUseExtraTimeCard.userExtraTimeCards.filter(item => item.status === 0);
            res.data.orderUseExtraTimeCard.userExtraTimeCards.map(item => {
              if ((res.data.roomIlk === item.cardIlk)&&item.status==0) {
            
              item.showtxt=`${item.duration}分钟${item.cardName}`
                this.changeCardList.push(item);
                
              }
            });
          }

          if (res.data.reorderDetailsList && res.data.reorderDetailsList.length) {
            res.data.reorderDetailsList.forEach(item=>{
              if (item.reorderMinute >=60) {
                item.reorderHour = (item.reorderMinute / 60).toFixed(1) + '小时'
              } else {
                item.reorderHour = item.reorderMinute + '分钟'
              }
            })
          }
          let data = {
            startDate1,
            startSj:`${startSj[0]}:${startSj[1]}`,
            endDate1,
            endSj:`${endSj[0]}:${endSj[1]}`,
            startWeek:weeks[+startWeek],
            endWeek:weeks[+endWeek],
            timeLength,
          }
          //console.log(data)
          this.msg = Object.assign(data,res.data)
          wx.hideLoading()
        }else{
          wx.hideLoading()
          this.$toast(res.message)
        }
      })
    },

    // 算选择多少小时
    getHour(s1, s2) {
      var reDate = /\d{4}-\d{1,2}-\d{1,2} /;
      s1 = new Date((reDate.test(s1) ? s1 : '2018-1-1 ' + s1).replace(/-/g, '/'));
      s2 = new Date((reDate.test(s2) ? s2 : '2018-1-1 ' + s2).replace(/-/g, '/'));
      var ms = s2.getTime() - s1.getTime();
      if (ms < 0) return 0;
      return (ms / 1000 / 60 / 60).toFixed(1);  //小时
    },

    onChange(e) {
      this.timeData = e.target
      this.timeData.hours = this.timeData.hours<10?'0'+this.timeData.hours:this.timeData.hours
      this.timeData.minutes = this.timeData.minutes<10?'0'+this.timeData.minutes:this.timeData.minutes
      this.timeData.seconds = this.timeData.seconds<10?'0'+this.timeData.seconds:this.timeData.seconds
    },
  },
  onShow(){
    this.getRoomList()
    this.getOrderMsg()
    // this.getCardList()
  },
  onLoad(options) {
    //console.log(options)
    this.orderId = options.orderId
    this.cardDuration=''
    wx.getSystemInfo({
      success: (res) => {
        //console.log("手机信息res" + res.model);
        let modelmes = res.model;
        if (
          modelmes.search("iPhone 14") != -1 ||
          modelmes.search("iPhone 13") != -1 ||
          modelmes.search("iPhone 12") != -1 ||
          modelmes.search("iPhone 11") != -1 ||
          modelmes.search("iPhone X") != -1 ||
          modelmes.search("iPhone XR") != -1 ||
          modelmes.search("iPhone XS") != -1
        ) {
          this.isIphoneXnum = 30;
        } else {
          this.isIphoneXnum = 20;
        }
      },
    });
  },
};
</script>

<style lang="scss" scoped>
@font-face {
  font-family: "kaiti";
  src: url("https://leciit.oss-cn-chengdu.aliyuncs.com/gxe/1636716444642429%281%29.ttf");
}
.content_box {
  min-height: 100vh;
  background: #F5F5F5;
  .time_box{
    padding:0 30rpx;
    height: 84rpx;
    background: linear-gradient(135deg, #FF5F40 0%, #FFB452 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    .box{
      display: flex;
      align-items: center;
      font-size:30rpx;
      color:#fff;
      font-family: "kaiti";
      .down{
        margin-left:20rpx;
        font-weight: 500;
        .item{
          font-size:42rpx;
          color:#fff;
        }
        .mh{
          font-size:30rpx;
          margin:0 6rpx;
        }
      }
    }
  }
  .img_box{
    position: relative;
    .dots{
      position: absolute;
      bottom: 30rpx;
      right: 30rpx;
      width: 70rpx;
      height: 46rpx;
      background: rgba(0, 0, 0, 0.4);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 20rpx;
      font-size: 28rpx;
      img{
        width: 30rpx;
        margin-right: 5rpx;
      }
    }
  }
  .taiqiu-room{
    margin: 26rpx;
    padding-top: 5px;
    p {
      width: 168rpx;
      height: 140rpx;
      line-height: 140rpx;
      display: inline-block;
      background: #fff;
      text-align: center;
      border-right: 1rpx solid #F2F1F4;
      border-bottom: 1rpx solid #F2F1F4;
      font-size: 26rpx;
      border-radius: 8rpx;
      &:first-child{
        margin-top: 26rpx;
      }
      &.on {
        background: #00C200;
        color:#fff;
      }
    }
  }
  .coupon-box {
    // margin: 26rpx;
    // background: #fff;
    width: 646rpx;
    margin: 15px auto;
    padding: 26rpx;
    background: linear-gradient(131.08deg, rgba(33, 25, 23, 1) 0%, rgba(83, 73, 71, 1) 100%);
    // padding:20rpx 26rpx 30rpx 26rpx;
    border-radius: 16rpx;
    position: relative;
    overflow: hidden;
    .cou_img{
      position: absolute;
      top: 0;
      left: 130px;
      // right: -100px;
      // top: -100px;
      width: 646rpx;
      height: 200rpx;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .cou_img2{
      opacity: 0.5; /* 50%透明度 */
    
      position: absolute;
      top: 0px;
      right: 0;
      // right: -100px;
      // top: -100px;
      width: 130rpx;
      height: 120rpx;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .name{
      font-size: 34rpx;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #F2DBA8;
    }
    .nr{
      font-size: 28rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #FFF3C2;
      margin-top:10rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      display: flex;
      span{
              font-weight: 600;
              font-size: 20px;
              padding: 0 5px;
            }
      .an{
        width: 110rpx;
        color:#FFF3C2;
        border: 2rpx solid #FFF3C2;
        // background-color:rgba(33, 25, 23, 1) ;
        font-size: 26rpx;
        text-align: center;
        border-radius: 100rpx;
        padding: 6rpx 20rpx;
        z-index: 2;
        &.on {
          color:#999;
          border-color:#999;
        }
      }
    }
    .text{
      font-size: 26rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #D9B88D;
      margin-top:10rpx;
    }
  }
  .room_msg{
    margin: 26rpx;
    background: #fff;
    padding:26rpx 30rpx 26rpx;
    border-radius: 16rpx;
    .name_box{
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 34rpx;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #111111;
      height: 98rpx;
      border-bottom:1px solid #F2F1F4;
      img{
        width: 40rpx;
        height: 40rpx;
      }
    }
    .msg_box{
      background: #fff;
      margin:0 auto;
      border-radius: 15rpx;
      margin-top:30rpx;
      .changeTime{
        border-radius: 15rpx;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .text{
          font-size: 24rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #999999;
          margin-bottom:16rpx;
        }
        .time{
          font-size: 28rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #111111;
          margin-top:16rpx;
        }
        .day{
          font-size: 30rpx;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #00C200;
        }
        .center{
          display: flex;
          align-items: center;
          .totel{
            width: 220rpx;
            height: 64rpx;
            line-height: 64rpx;
            background: #00C200;
            text-align: center;
            border-radius: 100rpx;
            font-size: 30rpx;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #FFFFFF;
          }
        }
      }
    }
    button::after {
      border: none;
    }
    button{
      background: none;
      margin:0;
      padding:0
    }
  }
  .cz_box{
    margin:0 26rpx;
    background: #fff;
    border-radius: 16rpx;
    font-size: 26rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #111111;
    padding:26rpx 0;
    display: flex;
    justify-content: space-around;
    .box{
      display: inline-block;
      text-align: center;
      width: 25%;
      &.on_on{
        opacity: 0.5;
      }
    }
    img{
      width: 64rpx;
      height: 64rpx;
      margin-bottom:10rpx;
    }
  }
  .order_msg{
    margin:26rpx;
    background: #fff;
    border-radius: 16rpx;
    .title_box{
      height: 102rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom:1px solid #f9f9f9;
      padding:0 26rpx;
      .title{
        font-size: 32rpx;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #111111;
        display: flex;
        align-items: center;
        span{
          margin-right: 16rpx;
          display: inline-block;
          width: 6rpx;
          height: 30rpx;
          background: #00C200;
          border-radius: 4rpx;
        }
      }
      .status{
        padding:0 20rpx;
        height: 46rpx;
        line-height: 46rpx;
        text-align: center;
        background: #F04925;
        font-size:26rpx;
        color:#fff;
        border-radius: 30rpx;
        border-bottom-left-radius: 0;
        &.on{
          background: #666666;
        }
        &.on1{
          background: #FF8515;
        }
      }
    }
    .list_box{
      padding:0 26rpx 26rpx 26rpx;
      margin:26rpx 0;
      .box{
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom:40rpx;
        .title{
          font-size: 28rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #666666;
        }
        .text{
          font-size: 28rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #111111;
        }
        &:last-child{
          margin-bottom:0;
        }
        .text{
          color:#646464;
        }
      }
    }
    
  }
  .action_box{
    padding-bottom: 10rpx;
    border-radius: 4rpx;
    background: #fff;
    width: 94%;
    margin:20rpx auto 0 auto;
    border-radius: 16rpx;
    .xufei{
      margin:0 26rpx;
      .x_nr{
        padding-bottom:20rpx;
        border-bottom:1px solid #F2F1F4;
        padding-top:32rpx;
        &:last-child{
          border-bottom: none;
        }
        div{
          display:flex;
          align-items: center;
          justify-content: space-between;
          padding-bottom:32rpx;
          font-size: 28rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #666666;
          .yyy{
            color:#FF8515
          }
          .jxz{
            color:#00C200
          }
          .ywc{
            color:#666666;
          }
          .ytk{
            color:#666666;
          }
          &:last-child{
            padding-bottom:0;
          }
        }
      }
      .anniu{
        width: 136rpx;
        height: 48rpx;
        line-height: 48rpx;
        border: 2rpx solid #D6D6D6;
        font-size: 28rpx;
        font-family: PingFangSC-Regular, PingFang SC;
        color: #111111;
        border-radius: 50rpx;
        text-align: center;
        margin-left:auto;
      }
    }
    .tir_top{
      // height: 25rpx;
      padding: 0 30rpx;
      height: 90rpx;
      line-height:90rpx ;
      border-bottom:1px solid #f4f4f4;
      margin-bottom: 10rpx;
      font-size: 32rpx;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #111111;
      span{
        margin-right: 16rpx;
        display: inline-block;
        width: 6rpx;
        height: 30rpx;
        background: #00C200;
        border-radius: 4rpx;
      }
    }
    .tir_one{
      padding: 0 30rpx;
      line-height: 50rpx;
      display: flex;
      align-items: center;
      font-size:26rpx !important;
      font-family: PingFangSC-Regular, PingFang SC;
      color: #999999;
    }
  }

  .anniu_box{
    height: 144rpx;
    .box{
      position: fixed;
      bottom:0;
      height: 144rpx;
      background: #fff;
      width: 92%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      box-shadow: 0rpx -2rpx 2rpx 0rpx rgba(0,0,0,0.02);
      padding:0 30rpx;
      
    }
    p{
      width: 48%;
      height: 90rpx;
      line-height: 90rpx;
      text-align: center;
      background: #fff;
      border:1px solid #00C200;
      color:#00C200;
      border-radius: 50rpx;
      font-size:30rpx;
    }    
    .xd{
      background: #00C200;
      color:#fff;
    }
    .on{
      color:#999999;
      border-color:#999999;
    }
  }
  .wifi_pop{
    /deep/ .van-popup {
      background: none;
      width: 530rpx;
    }
    .box{
      width: 530rpx;
      height: 616rpx;
      position: relative;
      .bj{
        width: 530rpx;
        height: 616rpx;
        top:0;
        left: 0;
        position: absolute;
      }
      .nr{
        position: relative;
        z-index: 10;
        width: 80%;
        margin:0 auto;
        top:280rpx;
        .zhanghao{
          background: #F4FFF4;
          font-size: 28rpx;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #111111;
          padding:32rpx;
          border-radius: 16rpx;
          
          p{
           
            &:nth-of-type(1){
              margin-bottom:24rpx;
            }
          }
        }
        
      }
      .anniu{
        height: 80rpx;
        line-height: 80rpx;
        background: #00C200;
        border-radius: 40rpx;
        margin-top:48rpx;
        font-size: 32rpx;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #FFFFFF;
        text-align: center;
      }
      .anniu1{
        width: 434rpx;
        height: 80rpx;
        line-height: 80rpx;
        background: #00C200;
        border-radius: 40rpx;
        margin:0 auto;
        margin-top:40rpx;
        font-size: 32rpx;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #FFFFFF;
        text-align: center;
        position: relative;
        top:250rpx;
      }
      .nr1{
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding-bottom:48rpx;
        position: relative;
        top:280rpx;
      }
      button::after {
        border: none;
      }
      button{
        background: none;
        color:#222;
        margin:0;
        .img{
          width: 160rpx;
          height: 160rpx;
          background: #F8F8F8;
          border-radius: 16rpx;
          display: flex;
          align-items: center;
          flex-direction:column;
          justify-content: center;
          .img1{
            width: 70rpx;
            height: 70rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            img{
              width: 56rpx;
              height: 48rpx;
            }
          }
          .img2{
            width: 70rpx;
            height: 70rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            img{
              width: 42rpx;
              height: 56rpx;
            }
          }
        }
        .text{
          font-size: 26rpx;
          font-family: PingFangSC-Regular, PingFang SC;
          color: #111111;
          text-align: center;
        }
      }
    }
    .close{
      width: 64rpx;
      height: 64rpx;
      margin:32rpx auto 0 auto;
      img{
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>